package eg.ci.mvn.service.api.model.param;

import eg.ci.mvn.service.api.model.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.List;

import static eg.ci.mvn.service.api.model.param.ParkingCardParam.*;
import static eg.ci.mvn.service.api.model.param.ParkingMemberParam.*;

@Data
@NoArgsConstructor
@Schema(description =  "ParkingGlobalParam-参数")
public class ParkingGlobalParam {

    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingQueryGlobalParam-查询全局信息")
    public static class ParkingQueryGlobalParam extends BaseDTO {
        @Schema(description = "车道编码", example = "420103000001")
        private String parkCode;
    }

    @SuperBuilder(toBuilder = true)
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingResultGlobalParam-查询全局信息")
    public static class ParkingResultGlobalParam extends ParkLot {

        @Schema(description = "区域清单")
        private List<Region> regions;

        @Schema(description = "通道口清单")
        private List<Gate> gates;

        @Schema(description = "卡组卡证")
        private List<CardGroup> cardGroups;

        @Schema(description = "套餐清单")
        private List<CardRole> cardRoles;

        @Schema(description = "计费清单")
        private List<CardFee> cardFees;

        @Schema(description = "通信规则清单")
        private List<AccessRule> accessRules;

        @Schema(description = "卡证会员")
        private List<CardMember> cardMembers;

    }

    @SuperBuilder(toBuilder = true)
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingResultGlobalParam-ParkLot-停车场信息")
    public static class ParkLot {
        @Schema(description = "车道编码", example = "420103000001")
        private String parkCode;

        @Schema(description = "车道名称", example = "420103000001")
        private String parkName;
    }


    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingResultGlobalParam-Region-区域信息")
    public static class Region {
        @Schema(description = "区域编码", example = "42010300000101")
        private String regionCode;

        @Schema(description = "区域名称", example = "地面区域")
        private String regionName;
    }

    @Builder
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "ParkingResultGlobalParam-Region-Gate-通道口信息")
    public static class Gate {
        @Schema(description = "通道口编码", example = "42010300000101")
        private String gateCode;

        @Schema(description = "通道口名称", example = "地面区域入口一")
        private String gateName;

        @Schema(description = "通道口类型 1-入口，2-出口", example = "1")
        private Integer gateType;
    }


}
